Skip to content

Land #530 and #533 for provider 0.10.18 - #534

Merged
jonathan308 merged 6 commits into
mainfrom
candidate/0.10.18-c6-sdk
Nov 24, 2026
Merged

jonathan308 merged 6 commits into
mainfrom
candidate/0.10.18-c6-sdk

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 24, 2026 •

Copy link
Copy Markdown

This lands two PRs on main through one candidate branch, candidate/0.10.18-c6-sdk. Its head 20fa3d540d is a chain of signed merges onto main 4bb2b43ee8. Provider 0.10.18 pins and qualifies this exact commit.

Please land it with a merge commit (not squash or rebase), so that 20fa3d540d stays in main's history.

Merge PR Head What it changes
9f450f4d #530 f335812335 A checkpoint restore decodes its coded rows on several cores, straight into its paged storage
20fa3d54 #533 175069698c A prompt-length limit for MTP drafting (CBv2MTPConfig.maxDraftPromptTokens, off by default)

Both merges are clean git merge-tree results; no file conflicted.

Test plan

AI usage

  • I have read this PR description in full and approve it as my own, and it
    accurately describes the code changes.
  • AI usage disclosure: an AI agent (Claude Opus 5.5, in OpenCode) built the merge commits and wrote this description, and opened this PR on the repository owner's behalf under the owner's authorization for this release. Each merged PR discloses its own AI use. The acknowledgement box above is left for the owner.

jonathan308 and others added 6 commits November 23, 2026 22:08
…o its pages

A complete-checkpoint restore of a lossy (balanced) checkpoint decoded every
coded row on the staging thread, then copied it 16 KiB at a time into the
staged pages, and the pages themselves were staged as copied host zeros.
Models that store their sliding-window layers coded paid this cost on every
restore, even for a one-block hit.

- With more than one decoding thread (at most eight, and at most half the
  active cores), the streaming row decoder decodes the whole rows of a
  transfer call concurrently, a wave of 1,024 rows at a time. Rows of a paged
  native layer are written straight to their page addresses
  (CBv2PagedCheckpointStorage.rowTargets, the same addresses append writes);
  other rows keep the ordered batched sink calls. Each row's bytes are a pure
  function of its coded bytes, so the restored state is unchanged. A refused
  row fails the transfer with the same error, and the staged rows are those
  the sequential decode leaves.
- Provider-staged checkpoint segments wrap zero-fill-on-demand pages when the
  live pool does (PagedKVPoolConfig.hostZeroedSegments), as admission growth
  already does, instead of copying host zeros into fresh buffers.
- The wave's scratch and bookkeeping are charged with the import's decoder
  scratch.
- DARKBLOOM_PREFIX_CACHE_PARALLEL_STAGE=0 keeps every row on the calling
  thread and the original sink path; a pool without hostZeroedSegments keeps
  copied host zeros.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…row decode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CBv2MTPConfig.maxDraftPromptTokens (nil by default) keeps a request whose prompt holds more tokens than the limit target-only for its whole lifetime, as a reasoning budget does: no drafts and no assistant history, so its tokens are the MTP-off engine's. Rows at or under the limit are unchanged; a value below one means no limit.
writeNative now writes into a caller's buffer (writeNative(_:into:)), so
the existing testBF16CheckBeforeRoundingRefusesNaNsThatRoundToFiniteWords
gives it one row of BF16 destination. The assertion is unchanged: every
NaN pattern that rounds to a finite word is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit to Layr-Labs/d-inference that referenced this pull request Nov 24, 2026
Pin mlx-swift-lm 20fa3d540d (candidate/0.10.18-c6-sdk, landing PR
Layr-Labs/mlx-swift-lm#534): main 4bb2b43ee8 with a merge of #530
(f335812335, the concurrent checkpoint row decode) and a merge of #533
(175069698c, a prompt-length limit for MTP drafting). Against f335812335 it
adds only #533's change; #533's provider side and docs are their own PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308
jonathan308 marked this pull request as ready for review November 24, 2026 07:03
@jonathan308
jonathan308 merged commit 52f8166 into main Nov 24, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant